package com.zzyang.mybatis.jdbc.spring.config;

import com.zzyang.mybatis.jdbc.spring.SpringContextUtils;
import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * 初始化 {@link SpringContextUtils}
 *
 * @author zhuiziyang
 * @date 2021/4/9 12:50
 */
public class SpringContextUtilsApplicationContextInitializer implements ApplicationContextInitializer<ConfigurableApplicationContext> {

    @Override
    public void initialize(ConfigurableApplicationContext configurableApplicationContext) {
        SpringContextUtils.setApplicationContext(configurableApplicationContext);
    }

}
